//
//  PTUser.m
//  PythonTestDemo
//
//  Created by 九月 on 12/24/24.
//

#import "PTUser.h"

@interface PTUser () {
    CGFloat _cellHeight;
}

@end

@implementation PTUser

NSString * kTTotheString(Byte bytes[]) {
    
    return @"";
}

static id mirchiLocalInstance = nil;
+ (instancetype)share {
    if (!mirchiLocalInstance) {
        @synchronized (self) {
            if (!mirchiLocalInstance) {
                mirchiLocalInstance = [[[self class] alloc] init];
            }
        }

    }
    return mirchiLocalInstance;
}

+ (id)allocWithZone:(struct _NSZone *)zone {
    @synchronized (self) {
        if (!mirchiLocalInstance) {
            mirchiLocalInstance = [super allocWithZone:zone];
            return mirchiLocalInstance;
        }
    }
    return nil;
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.name = @"name";
        self.age = 19;
    }
    return self;
}

+ (instancetype)modelWithName:(NSString *)name {
    PTUser *user = [PTUser new];
    user.name = name;
    return user;
}

- (void)eatSome {
    NSLog(@"吃啥");
}

- (void)whoEatSome:(NSString *)name eatNorthing:(NSString *)foodName {
    PTUser *user = [PTUser new];
    user.name = name;
    
    NSLog(@"%@早上吃了%@", name, foodName);
}

- (NSString *)ttotheHeight {
    return @"哈比比";
}

- (CGFloat)cellHeight {
    if (!_cellHeight) {
        _cellHeight = 10.0f;
    }
    return _cellHeight;
}

- (NSString *)name {
    if (!_name) {
        _name = @"九月";
    }
    return _name;
}

- (void)setHeight:(CGFloat)height {
    _height = height;
    
    NSLog(@"height = %f", height);
}

- (void)setGirlsFriends:(NSArray *)girlsFriends {
    _girlsFriends = girlsFriends;
}

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{
        @"yyWeight" : @"weight"
    };
};
@end
